import https from '../../utils/request';
export const GetArticleList=()=>{
    return https.get('/home/articles');
}
export const GetUserNameBySeriesId=(id)=>{
    return https.get(`/home/getUserNameBySeriesId/${id}`);
}
export const GetArticleById=(id)=>{
    return https.get(`/home/getArticleById/${id}`);
}
export const GetArticleBySeriesId=(id)=>{//根据系列id获取文章
    return https.get(`/home/getArticleBySeriesId/${id}`)
}
export const SystemMessageList=(id)=>{
    return https.get(`/home/systemMessageList/${id}`);
}
export const GetArticleSeriesById=(id)=>{
    return https.get(`/home/getArticleSeriesById/${id}`);
}
export const GetArticleSeriesListByUserId=(id)=>{
    return https.get(`/home/getArticleSeriesListByUserId/${id}`);
}
export const DeleteArticleById=(id,userId)=>{
    return https.delete(`/home/DeleteArticleById/${id}/${userId}`);
}

export const DeleteArticleSeriesById=(id,userId)=>{
    return https.delete(`/home/DeleteArticleSeriesById/${id}/${userId}`);
}

export const GetAllArticleByUserId=(id)=>{//获取指定id用户所有文章
    return https.get(`/home/GetAllArticle/${id}`);
}

export const ParseCard=(userId,seriesId)=>{//解析卡片数据
    return https.get(`/home/parse/${userId}/${seriesId}`);
}

export const GetLatestArticles=(userId)=>{
    return https.get(`/home/latestArticles/${userId}`)
}

export const addAccessCount=(id)=>{
    return https.post(`/home/addAccessCount/${id}`)
}

export const thumbsUp=(articleId,userId)=>{
    return https.put(`/home/thumbsUp/${articleId}/${userId}`);
}

export const DeleteThumbsUpByData=(articleId,userId)=>{
    return https.delete(`/home/removeThumbsUp/${articleId}/${userId}`)
}

export const GetRecords=(userId)=>{
    return https.get(`/home/getRecords/${userId}`)
}

export const HotArticle=()=>{
    return https.get(`/home/hotsArticle`)
}